package com.example.demo.service;

import com.example.demo.entity.two.MyDevicePage;
import com.example.demo.repository.two.MyDevicePageRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by pengwan on 2017/6/26.
 */
@Service
public class MyDevicePageService {
    @Autowired
    MyDevicePageRepository myDevicePageRepository;
    public List<MyDevicePage> findByDepartmentId(int departmentId){
        return this.myDevicePageRepository.findByDepartmentIdOrderByMyDevicePageSortAsc(departmentId);
    }
}
